<?php
    use yii\helpers\Html;
    use yii\bootstrap\ActiveForm;
    use yii\bootstrap\Button;
    use app\modules\core\models\FieldForm;

    $form = ActiveForm::begin([
        'id'        => 'model-form',
        'layout' => 'horizontal',
        'method'    => 'post',
        'fieldConfig' => [
            'template' => '{label}<div class="col-lg-5">{input}</div><div class="col-lg-4">{error}</div>',
            'labelOptions' => ['class' => 'col-lg-3 control-label'],
        ],
    ]);

    echo $form->field($model, 'name')->textInput(['autofocus' => true])->label('名称');

    echo Button::widget([
	'label' => '+',
	'options' => ['class' => 'btn-lg'],
    ]);
    echo $form->field($model, 'fields')->textInput()->label('字段列表');

?>
        <div class="form-group">
            <div class="col-lg-offset-5 col-lg-12">
                <?php echo Html::submitButton('提交', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
            </div>
        </div>
<?php ActiveForm::end(); ?>

